package cn.itheima.order.orderservice.impl;

import cn.itheima.dubbo.api.OrderService;
import cn.itheima.dubbo.domain.Order;
import cn.itheima.order.mapper.OrderMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;


@DubboService
public class OrderServiceImpl extends ServiceImpl<OrderMapper,Order> implements OrderService {

@Autowired
private  OrderMapper orderMapper;
    @Override
    public List<Order> findByUserId(Long id) {
        List<Order> orders = orderMapper.findByUserId(id);
        return orders;
    }
}
